Python Business Intelligence Cookbook by 2015

Python Business Intelligence Cookbook by 2015
Author: 2015
Language: eng
Format: epub
Publisher: Packt Publishing

Showing the histogram as a stepped line

Matplotlib allows a number of different histogram types. In this recipe, you will create a stepped line histogram. This is an exact copy of the previous recipes except for a single argument, hist() - histtype='step'.

How to do it…

To create a histogram as a stepped line, begin by importing all the required libraries. To show the matplotlib plots in IPython Notebook, we will use an IPython magic function which starts with %:%matplotlib inline import pandas as pd import numpy as np from pymongo import MongoClient import matplotlib as mpl import matplotlib.pyplot as plt